<template>
  <recursion-table title="年度放射工作人员职业性外照射个人监测汇总表" :requestMethod="personMonitorSummary">
    <template #print="{dataList}">
      <thead>
        <tr>
          <td rowspan="2" align="center">职业类别</td>
          <td rowspan="2" align="center">年份</td>
          <td rowspan="2" align="center"><div>受监测人员总数<i>$N_m$</i></div>
        <div>人</div></td>
        <td rowspan="2" align="center"><div>可测到受照射人员总数<i>$N_d$</i></div>
        <div>人</div></td>
          <td colspan="2" align="center"><div>人均年有效剂量E</div>
        <div>mSv/a</div></td>
          <td rowspan="2" align="center">
            <div>年集体有效剂量 S</div>
            <div>人·Sv</div>
          </td>
          <td rowspan="2" align="center">
            <div>集体剂量分布比</div>
            <div><i>$SR_5$</i></div>
          </td>
          <td rowspan="2" align="center">
            <div>个人剂量人员分布比</div>
            <div><i>$NR_5$</i></div>
          </td>
        </tr>
        <tr>
          <td align="center">受监测人员</td>
          <td align="center">可测量到受照射人员</td>
        </tr>
      </thead>
      <tr v-for="(item,index) in dataList" :key="index">
        <td align="center"><dict-tag :value="item.occupationalClassification" :options = "dict.type.occupational_classification"></dict-tag></td>
        <td align="center">{{item.year}}</td>
        <td align="center">{{item.acceptMonitorNumber}}</td>
        <td align="center">{{item.canMonitorNumber}}</td>
        <td align="center">{{item.perCapitaAcceptMonitorNumber}}</td>
        <td align="center">{{item.perCapitaCanMonitorNumber}}</td>
        <td align="center">{{item.collectiveEffectiveDose}}</td>
        <td align="center">{{item.doseDistribution}}</td>
        <td align="center">{{item.personnelDistribution}}</td>
      </tr>
    </template>
    <template>
      <el-table-column label="职业类别" align="center" prop="occupationalClassification" :show-overflow-tooltip="true">
        <template slot-scope="scope">
          <dict-tag :value="scope.row.occupationalClassification" :options = "dict.type.occupational_classification">
          </dict-tag>
        </template>
      </el-table-column>
      <el-table-column label="年份" align="center" prop="year" />
      <el-table-column  align="center" prop="acceptMonitorNumber">
        <template slot="header">
          <div>受监测人员总数<i>$N_m$</i></div>
          <div>人</div>
        </template>
      </el-table-column>
      <el-table-column  align="center" prop="canMonitorNumber">
        <template slot="header">
          <div>可测到受照射人员总数<i>$N_d$</i></div>
          <div>人</div>
        </template>
      </el-table-column>
      <el-table-column align="center">
        <template slot="header">
          <div>人均年有效剂量E</div>
          <div>mSv/a</div>
        </template>
        <el-table-column label="受监测人员" align="center" prop="perCapitaAcceptMonitorNumber" />
        <el-table-column label="可测量到受照射人员" align="center" prop="perCapitaCanMonitorNumber" />
      </el-table-column>
      <el-table-column  align="center" prop="collectiveEffectiveDose">
        <template slot="header">
          <div>年集体有效剂量 S</div>
          <div>人·Sv</div>
        </template>
      </el-table-column>
      <el-table-column  align="center" prop="doseDistribution">
        <template slot="header">
          <div>集体剂量分布比</div>
          <div><i>$SR_5$</i></div>
        </template>
      </el-table-column>
      <el-table-column  align="center" prop="personnelDistribution">
        <template slot="header">
          <div>个人剂量人员分布比</div>
          <div><i>$NR_5$</i></div>
        </template>
      </el-table-column>
    </template>
  </recursion-table>
</template>

<script>
  import { personMonitorSummary } from "@/api/form/form";
  import RecursionTable from "./components/RecursionTable";
  export default{
    name:'personalTesting',
    components:{RecursionTable},
    data(){
      return {
      }
    },
    dicts: ['occupational_classification'],
    methods:{
      personMonitorSummary(val){
        return personMonitorSummary(val)
      }
    },
  }
</script>

<style>
</style>
